package cate.common.table.guild;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;

import easy.java.dev.note.NoteField;

public class GuildMallItemRow extends ERow {
    @NoteField(value = "商品名")
    public String name;

    @NoteField(value = "商店ID")
    public int mallId;

    @NoteField(value = "商品内容")
    public String itemConfig;

    @NoteField(value = "资源消耗")
    public String consumeConfig;

    @NoteField(value = "限购类型")
    public String autoCycle;

    @NoteField(value = "限购次数")
    public int limitNum;

    @NoteField(value = "折扣")
    public int discount;

    @NoteField(value = "公会等级")
    public int guildRequired;

    @Override
    public void parse(XSSFRowWrap xr) {
        this.id = xr.getInteger("商品ID", 0);
        this.name = xr.getString("商品名称","");
        this.itemConfig = xr.getString("商品内容","");
        this.mallId = xr.getInteger("商店ID", -1);
        this.consumeConfig = xr.getString("购买消耗","");
        this.discount = xr.getInteger("折扣", -1);
        this.limitNum = xr.getInteger("限购次数", -1);
        this.autoCycle = xr.getString("限购类型","");
        this.guildRequired = xr.getInteger("解锁公会等级",1);
    }
}
